/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.afcepf.projet2.metiers.donnees.entites.comptes;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author sylva_000
 */
@Entity
@XmlTransient
@NamedQueries({
    @NamedQuery(name = "Civilite.findAll", 
	query = "SELECT c FROM Civilite  c"),
        @NamedQuery(name = "Civilite.findByNom", 
	query = "SELECT c FROM Civilite c WHERE c.civilite =:civilite")
	})
public class Civilite implements Serializable  {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name="idCivilite")
    private Integer idCivilite;
    @Column(length = 15, unique = true, nullable = false,
            name="Civilite")
    private String civilite;

    public Integer getIdCivilite() {
        return idCivilite;
    }

    public String getCivilite() {
        return civilite;
    }

    public void setIdCivilite(Integer idCivilite) {
        this.idCivilite = idCivilite;
    }

    public void setCivilite(String civilite) {
        this.civilite = civilite;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCivilite != null ? idCivilite.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Civilite)) {
            return false;
        }
        Civilite other = (Civilite) object;
        if ((this.idCivilite == null && other.idCivilite != null) || (this.idCivilite != null && !this.idCivilite.equals(other.idCivilite))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.afcepf.projet2.entities.comptes.Civilite[ id=" + idCivilite + " ]";
    }
}
